package com.bw.a2301club

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.lifecycle.lifecycleScope
import com.bw.a2301club.databinding.ActivityMain2Binding
import com.bw.lib_common.base.BaseActivity

class MainActivity2 : BaseActivity<MainViewModel,ActivityMain2Binding>(){
    private val viewModel:MainViewModel by viewModels() //懒加载viewmodel，底层还是ViewModelProvider
    override val mLayoutResId: Int
        get() = R.layout.activity_main2

    override fun initView() {
        super.initView()
    }

    override fun initData() {
        super.initData()
        viewModel.getData()
    }

    override fun initListener() {
        super.initListener()
        //统一封装状态管理
        addCommonStateListener(viewModel.stateFlow_)
    }

}